﻿<Window x:Class="WpfChess.ChessController"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="WpfChessMain" Height="368" Width="530" Loaded="Window_Loaded" Icon="/WpfChess;component/WpfChess.ico">

    <DockPanel Name="appPanel">
        <Menu Height="22" Name="menu1" DockPanel.Dock="Top">
            <MenuItem Header="_File">
                <MenuItem Header="E_xit" Click="fileMenuExit_Click"/>
            </MenuItem>
            <MenuItem Header="_Game">
                <MenuItem Header="_Undo move" Name="gameMenuUndo" Click="gameMenuUndo_Click" />
                <MenuItem Header="_New game" Name="gameMenuNew" Click="gameMenuNew_Click"/>
                <MenuItem Header="_Resign game" Name="gameMenuResign" Click="gameMenuResign_Click" />
                <MenuItem Header="_Draw game" Name="drawMenu">
                    <MenuItem Header="Request draw from opponent" Name="drawMenuRequest" Click="drawMenuRequest_Click" />
                    <MenuItem Header="Claim draw on 50-move rule" Name="drawMenuFiftyMoves" Click="drawMenuFiftyMoves_Click" />
                    <MenuItem Header="Claim draw on threefold repetition rule now" Name="drawMenuRepetitionNow" Click="drawMenuThreefoldNow_Click" />
                    <MenuItem Header="Claim draw on threefold repetition rule after move" Name="drawMenuRepetitionLater" Click="drawMenuRepetitionLater_Click" />
                </MenuItem>
            </MenuItem>
            <MenuItem Header="_Help">
                <MenuItem Header="_About" Name="helpMenuAbout" Click="helpMenuAbout_Click"/>
            </MenuItem>
        </Menu>
        <DockPanel Name="nonMenuPanel" DockPanel.Dock="Bottom">
            <DockPanel Name="dockPanel1" Width="200" DockPanel.Dock="Right">
                <Grid Height="108" Name="grid1" Width="200" Focusable="False" DockPanel.Dock="Top">
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <Label Margin="3,3,0,0" Name="label1">Turn</Label>
                    <Label Grid.Row="1" Margin="3,3,0,0" Name="label2">Status</Label>
                    <Label Grid.Row="3" Margin="3,3,0,0" Name="label3">Promotion</Label>
                    <TextBlock Grid.Column="1" Margin="3,3,0,0" Name="statusTurn">(Turn)</TextBlock>
                    <TextBlock Grid.Column="1" Grid.Row="1" Margin="3,3,0,0" Name="status1">(status1)</TextBlock>
                    <TextBlock Grid.Column="1" Grid.Row="2" Margin="3,3,0,0" Name="status2">(status2)</TextBlock>
                    <ComboBox Grid.Column="1" Grid.Row="3" Margin="3,3,0,0" Name="promoList" IsReadOnly="False" SelectionChanged="promoList_SelectionChanged" >
                        <ComboBoxItem>Queen</ComboBoxItem>
                        <ComboBoxItem>Rook</ComboBoxItem>
                        <ComboBoxItem>Knight</ComboBoxItem>
                        <ComboBoxItem>Bishop</ComboBoxItem>
                    </ComboBox>
                </Grid>
                <ListBox Name="moveList" DockPanel.Dock="Bottom" ScrollViewer.VerticalScrollBarVisibility="Visible" />
            </DockPanel>
            <UniformGrid Name="boardGrid" Background="Tan" SizeChanged="boardGrid_SizeChanged"></UniformGrid>
        </DockPanel>
    </DockPanel>

</Window>
